<?php if (isset($sysmsg)) { ?>

    <script type="text/javascript">

    $(document).ready(function() {
       $(".closestatus").click(function () {
          $(this).parent().fadeOut("slow");
        });
    });

    </script>

    <?php if (is_array($sysmsg) && count($sysmsg) > 0) { ?>
        <?php foreach ($sysmsg as $msg) { ?>
            <?php if ($msg['type'] == MSG_ERROR) { ?>
                <div class="status error">
                        <p class="closestatus"><a href="#" title="Close">x</a></p>
                        <p><img SRC="<?php echo $base_url.$application; ?>/themes/<?php echo $theme; ?>/img/icons/icon_error.png" alt="Error" /><span>Error!</span> <?php echo $msg['message']; ?></p>
                </div>
            <?php } ?>
            <?php if ($msg['type'] == MSG_WARNING) { ?>
                <div class="status warning">
                        <p class="closestatus"><a href="#" title="Close">x</a></p>
                        <p><img SRC="<?php echo $base_url.$application; ?>/themes/<?php echo $theme; ?>/img/icons/icon_warning.png" alt="Warning" /><span>Attention!</span> <?php echo $msg['message']; ?></p>
                </div>
            <?php } ?>
            <?php if ($msg['type'] == MSG_INFO) { ?>
                <div class="status info">
                        <p class="closestatus"><a href="#" title="Close">x</a></p>
                        <p><img SRC="<?php echo $base_url.$application; ?>/themes/<?php echo $theme; ?>/img/icons/icon_info.png" alt="Information" /><span>Information:</span> <?php echo $msg['message']; ?></p>
                </div>
            <?php } ?>
            <?php if ($msg['type'] == MSG_HAPPY) { ?>
                <div class="status success">
                        <p class="closestatus"><a href="#" title="Close">x</a></p>
                        <p><img SRC="<?php echo $base_url.$application; ?>/themes/<?php echo $theme; ?>/img/icons/icon_success.png" alt="Success" /><span>Success!</span> <?php echo $msg['message']; ?></p>
                </div>
            <?php } ?>
        <?php } ?>
    <?php } ?>

<?php } ?>